09. K-Fold CV in sklearn

K-Fold CV in sklearn

INSTRUCTOR NOTE:

There's a simple way to randomize the events in sklearn k-fold CV: set the shuffle flag to true.

Then you'd go from something like this:

cv = KFold( len(authors), 2 )

To something like this:

cv = KFold( len(authors), 2, shuffle=True )